package com.seuic.hnjiningposapp.hnapps.ui.view.dialog;

import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.seuic.hnjiningposapp.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * 他行汇款 确认数据
 */
public class Other_cash_remitt_pp extends BaseCenterPopupView {
    Unbinder bind;
    @BindView(R.id.sure_deal_info_title)
    TextView sureDealInfoTitle;

    @BindView(R.id.deal_bankname)
    TextView dealBankname;
    @BindView(R.id.deal_num)
    TextView dealNum;
    @BindView(R.id.deal_username)
    TextView dealUsername;
    @BindView(R.id.deal_money)
    TextView dealMoney;
    @BindView(R.id.servicecharge)
    TextView servicecharge;
    @BindView(R.id.sure_deal_info_nobtn)
    Button sureDealInfoNobtn;
    @BindView(R.id.sure_deal_info_okbtn)
    Button sureDealInfoOkbtn;
    onCallBack mOnCallBack;

    String dealtype;//交易名称
    String dealBanknames;//银行名称
    String dealNums;//客户账号
    String dealUsernames;//客户姓名
    String dealMoneyS;//交易金额
    String servicechargeS;//手续费


    public Other_cash_remitt_pp(@NonNull Context context, onCallBack onCallBack) {
        super(context);
        mOnCallBack = onCallBack;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.other_cash_remitt_pp;
    }

    @OnClick({R.id.sure_deal_info_nobtn, R.id.sure_deal_info_okbtn})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.sure_deal_info_nobtn:
                mOnCallBack.Otherlaststep();
                break;
            case R.id.sure_deal_info_okbtn:
                mOnCallBack.OtherNext();
                break;
        }
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        bind = ButterKnife.bind(this);
        sureDealInfoTitle.setText(dealtype);
        dealBankname.setText(dealBanknames);
        dealNum.setText(dealNums);
        dealUsername.setText(dealUsernames);
        dealMoney.setText(dealMoneyS);
        servicecharge.setText(servicechargeS);
    }

    public void setDealtype(String dealtype) {
        this.dealtype = dealtype;
    }
    public String getDealBanknames() {
        return dealBanknames;
    }

    public void setDealBanknames(String dealBanknames) {
        this.dealBanknames = dealBanknames;
    }

    public String getDealNums() {
        return dealNums;
    }

    public void setDealNums(String dealNums) {
        this.dealNums = dealNums;
    }

    public String getDealUsernames() {
        return dealUsernames;
    }

    public void setDealUsernames(String dealUsernames) {
        this.dealUsernames = dealUsernames;
    }

    public String getDealMoneyS() {
        return dealMoneyS;
    }

    public void setDealMoneyS(String dealMoneyS) {
        this.dealMoneyS = dealMoneyS;
    }

    public String getServicechargeS() {
        return servicechargeS;
    }

    public void setServicechargeS(String servicechargeS) {
        this.servicechargeS = servicechargeS;
    }

    public interface onCallBack {
        void Otherlaststep();

        void OtherNext();
    }

    @Override
    protected void onDismiss() {
        super.onDismiss();
        //注解解绑
        if (bind != null && bind != Unbinder.EMPTY) {
            bind.unbind();
        }
        this.bind = null;
    }

}
